<?php
    session_start();
    include('Fonctions.php');
    include('header.php');
    
    $infosARF85->execute(array(
        'type_etude' => 'municipalite',
        'id_etude' => $_SESSION['id_etude']
    ));
    $i=1;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtod">
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "fr" >
    <head>		
        <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8" />
        <link type="text/css" rel="stylesheet" href="css/onglets.css" />
        <link type="text/css" rel="stylesheet" href="css/conventions.css" />
        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
        <script type="text/javascript" src="Ajout_champ.js" ></script>
        <script type="text/javascript" src="conventions.js"></script>
        <script type="text/javascript" src="etape5.js"></script>
        <script type="text/javascript" src="Etape_4.js"></script>
    </head>
    <body>
        <div id="racapARF85">
            <table style="border: 2px outset black;border-collapse:collapse;margin: auto;">
                <caption> Tableau récapitulatif des conventions ARF85</caption>
                <thead>
                    <tr>
                        <th style="text-align:center;border: 1px solid black;"> Numéro de la convention </th>
                        <th style="text-align:center;border: 1px solid black;"> Numéro de l'étude </th>
                        <th style="text-align:center;border: 1px solid black;"> Soussigné(s)</th>
                        <th style="text-align:center;border: 1px solid black;"> Statut des soussigné </th>
                        <th style="text-align:center;border: 1px solid black;"> Ville autorisée </th>
                        <th style="text-align:center;border: 1px solid black;"> Election de domicile </th>
                        <th style="text-align:center;border: 1px solid black;"> Lieu de signature </th>
                        <th style="text-align:center;border: 1px solid black;"> Date de signature </th>
                        <th style="text-align:center;border: 1px solid black;"> PDF </th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        while($arf85 = $infosARF85->fetch()){
                            $soussigne = cassageChaineCaractere($arf85['nom_soussigne'], "_", "soussigne");
                            $numAffaire->execute(array(
                               'id_toute_etude' => $_SESSION['id_etude']
                            ));
                            $num_affaire = $numAffaire->fetchColumn(0);
                            echo "<tr>
                                <td style=\"text-align:center;border: 1px solid black;\">".$i."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$num_affaire."</td>
                                <td style=\"border: 1px solid black;\">".$soussigne."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$arf85['proprio']."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$arf85['ville_autorise']."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$arf85['domicile']."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$arf85['lieu']."</td>
                                <td style=\"text-align:center;border: 1px solid black;\">".$arf85['date']."</td>
                                <td style=\"text-align:center;border: 1px solid black;\"> <a href=\"conventionARF85.php\"><input type=\"button\" value=\"Générer le PDF\"/></a></td>
                                </tr>";
                            $i++;
                        }
                    ?>
                </tbody>
            </table>
            
            <input type="button" value="Retour à l'étude" />
        </div>
    </body>
